package edu.ntu.im.p2ptrade.entity;

import java.io.Serializable;
import java.security.cert.Certificate;

public class User implements Serializable{
	static final long serialVersionUID = 649912149791811557L;
	Integer id;
	String name;
	String password;
	String desc = "";
	String serialNumber;
	String nickName = "";
	String photoURL;
	Certificate publickey;
	boolean trustable = false;
	
	public String getSerialNumber() {
		return serialNumber;
	}
	public void setSerialNumber(String serialNumber) {
		this.serialNumber = serialNumber;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getNickName() {
		return nickName;
	}
	
	public void setNickName(String nickname) {
		this.nickName = nickname;
	}
	
	public Certificate getPublicKey() {
		
		return this.publickey;
	}
	public void markAsTrustable() {
		this.trustable = true;
		
	}
	
	public void setTrustable(Boolean trustable){
		this.trustable = trustable;
	}
	
	public boolean isTrustable(){
		return this.trustable;
	}
	public void setPublicKey(Certificate certificate) {
		this.publickey = certificate;
		
	}
	public String getPhotoURL() {
		return photoURL;
	}
	public void setPhotoURL(String photoURL) {
		this.photoURL = photoURL;
	}

}
